package com.example.dao;

import java.util.List;
import java.util.Map;

import org.apache.ibatis.annotations.Mapper;
import org.apache.ibatis.annotations.Param;
@Mapper
public interface BusinessDataSynchronizationMapper {
	
	
	
	
	/**
	 *  查询下切报检单中的结果
	 * @return
	 */
	public List<Map<String,String>> select_jobcard_cut_result(@Param("projectId")Integer projectId);
	
	/**
	 * 更新下切jobcard中零件报检结果
	 * @return
	 */
	public int update_jobcard_cut_result(@Param("map")Map<String, String> map,@Param("projectId")Integer projectId);
	
	/**
	 * 修改下切报检单中行项状态改为已同步
	 * @return
	 */
	public int update_jobcard_cut_result_status(@Param("map") Map<String, String> map,@Param("status")String status);
	
	/**
	 * 查询组队报检单中的焊口信息
	 * @param projectId
	 * @return
	 */
	public List<Map<String,String>> select_jobcard_fitup_result(@Param("projectId")Integer projectId);
	/**
	 * 更新组队jobcard中零件报检结果
	 * @return
	 */
	public int update_jobcard_fitup_result(@Param("map")Map<String, String> map,@Param("projectId")Integer projectId);
	
	/**
	 * 修改组队报检单中行项状态改为已同步
	 * @return
	 */
	public int update_jobcard_fitup_result_status(@Param("map") Map<String, String> map,@Param("status")String status);
	
	/**
	 * 查询焊接报检单中的焊口信息
	 * @param projectId
	 * @return
	 */
	public List<Map<String,String>> select_jobcard_weld_result(@Param("projectId")Integer projectId);
	/**
	 * 更新焊接jobcard中零件报检结果
	 * @return
	 */
	public int update_jobcard_weld_result(@Param("map")Map<String, String> map,@Param("projectId")Integer projectId);
	
	/**
	 * 修改焊接报检单中行项状态改为已同步
	 * @return
	 */
	public int update_jobcard_weld_result_status(@Param("map") Map<String, String> map,@Param("status")String status);
	
	
	/**
	 * 删除每个新生成的出来的质检单行项为ACC的行项记录
	 * @return
	 */
	public int delete_jobcard_cut_result();
	/**
	 * 删除每个新生成的出来的质检单行项为ACC的行项记录
	 * @return
	 */
	public int delete_jobcard_fitup_result();
	/**
	 * 删除每个新生成的出来的质检单行项为ACC的行项记录
	 * @return
	 */
	public int delete_jobcard_weld_result();
	 
	/**
	 * 查询物料库存台账信息
	 * @param projectId
	 * @return
	 */
	public List<Map<String, String>> select_MaterialInventoryLedger(@Param("projectId")Integer projectId);
	
	/**
	 * 查询物料库存领料单
	 * @return
	 */
	public List<Map<String, String>> select_MaterialInventoryPickingList(@Param("projectId")Integer projectId);
	
	/**
	 * 查询进出口物料库存台账
	 * @param projectId
	 * @return
	 */
	public List<Map<String, String>> select_ImportAndExportMaterialInventoryLedger(@Param("projectId")Integer projectId);

	/**
	 * 查询进出口物料库存台账领料单
	 * @param projectId
	 * @return
	 */
	public List<Map<String, String>> select_ImportAndExportMaterialInventoryPickingList(@Param("projectId")Integer projectId);
	 
	/**
	 * 将相应的物料库存数据对及时库存进行同步
	 * @param list
	 * @param projectId
	 * @return
	 */
	public int update_RealTimeInventory(@Param("projectId")Integer projectId,@Param("list")List<Map<String, String>> list);
	/**
	 * 将相应的领料单数据对及时库存进行同步
	 * @param list
	 * @param projectId
	 * @return
	 */
	public int update_ReleaseLockRealTimeInventory(@Param("projectId")Integer projectId,@Param("list")List<Map<String, String>> list);

 
	/**
	 * 查询完成套料joncard的物料零件编码将其数量同步入即时库存
	 * @param projectId
	 * @return
	 */
	public List<Map<String, String>> select_jobcard_cut_MaterialProduced (@Param("projectId")Integer projectId);
	/**
	 * 查询完成焊接joncard的物料零件编码将其数量同步入即时库存
	 * @param projectId
	 * @return
	 */
	public List<Map<String, String>> select_jobcard_Weld_MaterialProduced (@Param("projectId")Integer projectId);
 
	/**
	 * 根据物料编码与物料类型
	 * 更新即时库存物料数量
	 * @param projectId
	 * @param materialSort
	 * @param list
	 * @return
	 */
	public int update_RealTimeInventory_MaterialSort(@Param("projectId")Integer projectId,@Param("materialSort")String materialSort,@Param("list")List<Map<String, String>> list);


	
	
	
	
	
	
}
